package ar.com.gestion;

import java.awt.Toolkit;
import java.sql.Timestamp;
import java.util.Date;

import javax.swing.JFrame;

public class GestionUtils {

	
	public final static Timestamp obtenerHoraActual(){
	Date date = new java.util.Date();
	return new Timestamp(date.getTime());
	}
	
	
	public final static void obtenerUbicacionEnPantalla(JFrame contexto){
		Toolkit t = Toolkit.getDefaultToolkit();
//		Double he = t.getScreenSize().getHeight() -contexto.getHeight();
//		Double wi = t.getScreenSize().getWidth() - contexto.getWidth();
		Double he = t.getScreenSize().getHeight() /2;
		Double wi = t.getScreenSize().getWidth() /2;
		
		
		contexto.setLocation((int)Math.floor( wi),(int)Math.floor(he));
		
	}
	
}
